/*
 * Created by JFormDesigner on Wed Jul 07 09:39:07 CST 2021
 */

package user;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 * @author DarkFire
 */
public class MainActivity extends JFrame {
    public MainActivity() {
        initComponents();
    }



    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        panel1 = new JPanel();
        tabbedPane1 = new JTabbedPane();
        sendPanel = new sendPanel();
        receviePanel = new Receive();

        //======== this ========
        setTitle("DarkFire\u5c40\u57df\u7f51\u6587\u4ef6\u4f20\u8f93\u5c0f\u5de5\u5177 Ver1.0");
        setMaximizedBounds(null);
        setVisible(true);
        setResizable(false);
        Container contentPane = getContentPane();
        contentPane.setLayout(null);

        //======== panel1 ========
        {
            panel1.setLayout(null);

            //======== tabbedPane1 ========
            {

                //======== sendPanel ========
                {
                    sendPanel.setLayout(null);

                    {
                        // compute preferred size
                        Dimension preferredSize = new Dimension();
                        for(int i = 0; i < sendPanel.getComponentCount(); i++) {
                            Rectangle bounds = sendPanel.getComponent(i).getBounds();
                            preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                            preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                        }
                        Insets insets = sendPanel.getInsets();
                        preferredSize.width += insets.right;
                        preferredSize.height += insets.bottom;
                        sendPanel.setMinimumSize(preferredSize);
                        sendPanel.setPreferredSize(preferredSize);
                    }
                }
                tabbedPane1.addTab("\u53d1\u9001\u6587\u4ef6", sendPanel);

                //======== receviePanel ========
                {
                    receviePanel.setLayout(null);

                    {
                        // compute preferred size
                        Dimension preferredSize = new Dimension();
                        for(int i = 0; i < receviePanel.getComponentCount(); i++) {
                            Rectangle bounds = receviePanel.getComponent(i).getBounds();
                            preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                            preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                        }
                        Insets insets = receviePanel.getInsets();
                        preferredSize.width += insets.right;
                        preferredSize.height += insets.bottom;
                        receviePanel.setMinimumSize(preferredSize);
                        receviePanel.setPreferredSize(preferredSize);
                    }
                }
                tabbedPane1.addTab("\u63a5\u6536\u6587\u4ef6", receviePanel);
            }
            panel1.add(tabbedPane1);
            tabbedPane1.setBounds(10, 10, 385, 245);

            {
                // compute preferred size
                Dimension preferredSize = new Dimension();
                for(int i = 0; i < panel1.getComponentCount(); i++) {
                    Rectangle bounds = panel1.getComponent(i).getBounds();
                    preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                    preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                }
                Insets insets = panel1.getInsets();
                preferredSize.width += insets.right;
                preferredSize.height += insets.bottom;
                panel1.setMinimumSize(preferredSize);
                panel1.setPreferredSize(preferredSize);
            }
        }
        contentPane.add(panel1);
        panel1.setBounds(0, 0, 400, 270);

        {
            // compute preferred size
            Dimension preferredSize = new Dimension();
            for(int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    public static void main(String[] args) {
        new MainActivity();
    }
    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    private JPanel panel1;
    private JTabbedPane tabbedPane1;
    private JPanel sendPanel;
    private JPanel receviePanel;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
